<template>
  <div class="home">
    <header>
      <img src="http://124.223.9.151:9012/static/img/header_border_dark.png">
      <span class="title">电商平台实时监控系统</span>
      <div class="time">
        <img src="http://124.223.9.151:9012/static/img/qiehuan_dark.png">
        <span>2019-01-01 00:00:00</span>
      </div>
    </header>
    <div class="charts">
      <div class="charts-left">
        <div class="chart-line">
          <ChartLine />
        </div>
        <div class="chart-bar-y">
          <ChartBarY />
        </div>
      </div>
      <div class="charts-center">
        <div class="chart-map">
          <ChinaMap />
        </div>
        <div class="chart-bar-x">
          <ChartBarX />
        </div>
      </div>
      <div class="charts-right">
        <div class="chart-pie">
          <ChartPie />
        </div>
        <div class="chart-gauge">
          <ChartGauge />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import ChartLine from '@/components/ChartLine.vue';
import ChartBarY from '@/components/ChartBarY.vue';
import ChinaMap from '@/components/ChinaMap.vue';
import ChartBarX from '@/components/ChartBarX.vue';
import ChartPie from '@/components/ChartPie.vue';
import ChartGauge from '@/components/ChartGauge.vue';

export default {
  components: { ChartLine, ChartBarY, ChinaMap, ChartBarX, ChartPie, ChartGauge }
}
</script>

<style lang="scss" scoped>
.home {
  height: 100%;
  background-color: #161522;
  padding: 0 20px;

  header {
    height: 64px;
    position: relative;

    // background-color: red;
    img {
      width: 100%;
    }

    .title {
      position: absolute;
      left: 50%;
      top: 25%;
      transform: translateX(-50%);
      color: white;
      font-size: 18px;
    }

    .time {
      position: absolute;
      right: 0%;
      top: 18%;
      display: flex;

      img {
        width: 28px;
        height: 21px;
      }

      span {
        margin-left: 10px;
        color: white;
        font-size: 14px;
      }
    }
  }

  .charts {
    height: calc(100% - 74px);
    margin-top: 10px;
    display: flex;

    .charts-left {
      width: 27.6%;

      // background-color: blue;
      >div {
        width: 100%;
        background-color: #222733;
        border-radius: 25px;
      }

      .chart-line {
        height: 58%;
      }

      .chart-bar-y {
        height: 34%;
        margin-top: 25px;
      }
    }

    .charts-center {
      width: 41.5%;
      // background-color: green;
      margin: 0 20px;

      >div {
        width: 100%;
        background-color: #222733;
        border-radius: 25px;
      }

      .chart-map {
        height: 61.33%;
      }

      .chart-bar-x {
        height: 30.66%;
        margin-top: 25px;
      }
    }

    .charts-right {
      width: 27.6%;

      // background-color: pink;
      >div {
        width: 100%;
        background-color: #222733;
        border-radius: 25px;
      }

      .chart-pie {
        height: 50.5%;
      }

      .chart-gauge {
        height: 41.5%;
        margin-top: 25px;
      }
    }
  }
}
</style>
